package br.com.colegio.dao.storage;


public class FinanceiroSaldoMensalData {/*
	private static FinanceiroSaldoMensalData instance;
	private Map<Long,FinanceiroSaldoMensal> data = new TreeMap<Long,FinanceiroSaldoMensal>();
	private Map<Long,Set<FinanceiroSaldoMensal>> dataConta = new TreeMap<Long,Set<FinanceiroSaldoMensal>>();

	private FinanceiroSaldoMensalData(){}

	public static FinanceiroSaldoMensalData getInstance(){
		if(instance == null)
			instance = new FinanceiroSaldoMensalData();

		return instance;
	}

	private Map<Long,FinanceiroSaldoMensal> getData(){
		if(data.size() == 0){
			Collection<Object> r = FinanceiroSaldoMensalDAO.list();
			if(r != null)
				for(Object o : r){
					FinanceiroSaldoMensal a = (FinanceiroSaldoMensal)o;
					data.put(a.getKey().getId(),a);

					if(!dataConta.containsKey(a.getContaKey()))
						dataConta.put(a.getContaKey(),new HashSet<FinanceiroSaldoMensal>());

					dataConta.get(a.getContaKey()).add(a);
				}
		}
		return data;
	}

	public Set<FinanceiroSaldoMensal> getItens(long conta){
		getData();

		if(dataConta.containsKey(conta))
			return dataConta.get(conta);

		return null;
	}

	public FinanceiroSaldoMensal getItem(Long id){
		return getData().get(id);
	}

	public Collection<FinanceiroSaldoMensal> getItens(){
		return getData().values();
	}*/
}